package com.example.demo.model;

import com.example.demo.model.User;
import java.time.LocalDateTime;

public class LoginResponse {
    private Integer userId;
    private String username;
    private User.Role role;
    private LocalDateTime createdAt; // 新增字段
    private String avatar;
    private String classnumber;

    public LoginResponse(Integer userId, String username, User.Role role, LocalDateTime createdAt, String avatar,String classnumber) {
        this.userId = userId;
        this.username = username;
        this.role = role;
        this.createdAt = createdAt;
        this.avatar = avatar;// 初始化新字段
        this.classnumber = classnumber;

    }

    // 新增getter方法
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }
    // 其他getter保持不变
    public Integer getUserId() {
        return userId;
    }

    public String getUsername() {
        return username;
    }

    public User.Role getRole() {
        return role;
    }

    public String getAvatar() { return  avatar;}
    public  String getclassnumber(){return classnumber;}
}